package com.ustarlink.windowzoomanimations;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;

public class DetailActivity extends AppCompatActivity {

    public static final String EXTRA_COLOUR = "EXTRA_COLOUR";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        View v = new View(this);
        v.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,
                FrameLayout.LayoutParams.MATCH_PARENT));
        setContentView(v);
        v.setBackgroundColor(getIntent().getIntExtra(EXTRA_COLOUR, 0));
        Log.i("TAG Color", getIntent().getIntExtra(EXTRA_COLOUR, 0) + "");
        v.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
